package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysBrickMapper;
import com.ruoyi.system.domain.SysBrick;
import com.ruoyi.system.service.ISysBrickService;
import com.ruoyi.common.core.text.Convert;

/**
 * 瓷砖Service业务层处理
 * 
 * @author Yanghc
 * @date 2024-08-16
 */
@Service
public class SysBrickServiceImpl implements ISysBrickService 
{
    @Autowired
    private SysBrickMapper sysBrickMapper;

    /**
     * 查询瓷砖
     * 
     * @param id 瓷砖主键
     * @return 瓷砖
     */
    @Override
    public SysBrick selectSysBrickById(Long id)
    {
        return sysBrickMapper.selectSysBrickById(id);
    }

    /**
     * 查询瓷砖列表
     * 
     * @param sysBrick 瓷砖
     * @return 瓷砖
     */
    @Override
    public List<SysBrick> selectSysBrickList(SysBrick sysBrick)
    {
        return sysBrickMapper.selectSysBrickList(sysBrick);
    }

    /**
     * 新增瓷砖
     * 
     * @param sysBrick 瓷砖
     * @return 结果
     */
    @Override
    public int insertSysBrick(SysBrick sysBrick)
    {
        return sysBrickMapper.insertSysBrick(sysBrick);
    }

    /**
     * 修改瓷砖
     * 
     * @param sysBrick 瓷砖
     * @return 结果
     */
    @Override
    public int updateSysBrick(SysBrick sysBrick)
    {
        return sysBrickMapper.updateSysBrick(sysBrick);
    }

    /**
     * 批量删除瓷砖
     * 
     * @param ids 需要删除的瓷砖主键
     * @return 结果
     */
    @Override
    public int deleteSysBrickByIds(String ids)
    {
        return sysBrickMapper.deleteSysBrickByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除瓷砖信息
     * 
     * @param id 瓷砖主键
     * @return 结果
     */
    @Override
    public int deleteSysBrickById(Long id)
    {
        return sysBrickMapper.deleteSysBrickById(id);
    }
}
